<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基本JQuery AJAX请求</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
    <button id="btnLoad">Load获取Content内容</button>
    <button id="btnGet">Get获取Content内容</button>
    <button id="btnAjax">Ajax获取Content内容</button>
    <div id="content"></div>
</body>
</html>
<script>
    $(document).ready(function(){
        $("#btnLoad").click(function () {
            // 可按筛选显示内容
            // $("#content").load('/content/');
            // $("#content").load('/content/ div');
            // $("#content").load('/content/ div a');
            $("#content").load('/app/content/', function(){ alert('内容已载入成功了！'); }
                );
        });
        $('#btnGet').click(function(){
            $.get('/app/content/',null,function(resp){
                // $('#content').text(resp);
                $('#content').html(resp);
            });
        });

        $('#btnAjax').click(function(){
            $.ajax({
                url:'/app/content/',
                data:null,
                type:'GET',
                success:function(resp){
                    $('#content').html(resp);
                }
            });
        });
    });
</script>